Skip to content

refactor(query): make agent cursor filter hash nanosecond-precise#577

Open
cyriltovena wants to merge 1 commit intomainfrom
cleanup/agent-cursor-filter-hash-nano
Open

refactor(query): make agent cursor filter hash nanosecond-precise#577
cyriltovena wants to merge 1 commit intomainfrom
cleanup/agent-cursor-filter-hash-nano

Conversation

@cyriltovena
Copy link
Collaborator

@cyriltovena cyriltovena commented Mar 17, 2026

Summary\n- switch agent list cursor filter hashing from RFC3339 to RFC3339Nano\n- keep UTC normalization so equivalent instants in different time zones hash identically\n- add regression tests for sub-second distinction and timezone-normalized equivalence\n\n## Why\nSecond-level truncation could allow stale cursors to remain valid when filter timestamps change within the same second.\n\n## Testing\n- cd sigil && go test ./internal/query -count=1


Note

Medium Risk
Behavioral change in cursor validation: existing agent list cursors may be rejected more often because filter timestamps are now hashed with nanosecond precision, which can affect pagination flows for clients.

Overview
Makes ListAgentsForTenant cursor filter hashing nanosecond-precise by formatting SeenAfter/SeenBefore with time.RFC3339Nano instead of second-level time.RFC3339, preventing cursors from remaining valid when filter timestamps change within the same second.

Adds regression tests to ensure buildAgentListFilterHash differs for sub-second time changes while still producing identical hashes for equivalent instants across time zones (UTC-normalized).

Written by Cursor Bugbot for commit 6cc8fe0. This will update automatically on new commits. Configure here.

Use RFC3339Nano in agent list filter hashing so cursor validation detects sub-second filter changes.

Add regression tests for sub-second distinction and timezone-normalized equivalent instants.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant